// request axios 二次封装模块
import request from '@/api/request'

// 暴露 获取全国的相关地址信息
// export const req_area=()=>{
//     return request({method:'get',url:'/area',arg:{},headerType:''})
// }
export const req_area=()=>request({
    method:'get',
    url:'/area',
    arg:{},
    headerType:''
})

// 提交学生信息 arg实际上是我们收集到的表单信息
export const req_stu_info=(arg)=>request({
    method:'post',
    url:'/student_info',
    arg,
    headerType:'form'
})

// 根据学号查询某个学生的成绩
// http://192.168.110.225:3000/search_info_item?stu_id=  请求get
export const req_stu_info_personal=(stu_id)=>request({
    method:'get',
    url:'/search_info_item',
    arg:{stu_id},
    headerType:''
})

// 请求所有学生的信息 search_info
export const req_all_stu_info =()=>request({
    method:'get',
    url:'/search_info',
    age:{},
    headerType:''
})

// 根据页码请求学生信息   /pages/1 
export const req_code_stu_info = (currentPage)=>request({
    method:'get',
    url:`/pages/${currentPage}`,
    arg:{},
    headerType:''
})

// 所有学生信息 不带头像
export const req_stu_info_nohead = ()=>request({
    method:'get',
    url:'/search_info_not',
    arg:{},
    headerType:''
})